package cn.humaohua.study.yanmo_design_pattern.ch03;

public class ConfigManager {
    private static ConfigManager configManager = null;
    private static ConfigModel configModel = null;

    private ConfigManager() {
    }

    public static ConfigManager getInstance() {
        if (configManager == null) {
            configManager = new ConfigManager();
            configModel = new ConfigModel();
            // read config file and set properties to configModel, omited here
        }
        return configManager;
    }

    public ConfigModel getConfigData() {
        return configModel;
    }
}
